<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>我的博客-后台管理</title>
    <!-- Bootstrap Styles-->
    <link href="{{ asset('assets/backend/css/bootstrap.css') }}" rel="stylesheet" />
    <!-- FontAwesome Styles-->
    <link href="{{ asset('assets/backend/css/font-awesome.css') }}" rel="stylesheet" />
    <!-- Morris Chart Styles-->

    <!-- Custom Styles-->
    <link href="{{ asset('assets/backend/css/custom-styles.css') }}" rel="stylesheet" />
    <!-- Google Fonts-->
    <link href='http://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css' />
	<!-- 标签 -->
	<link href="{{ asset('assets/backend/css/bootstrap-tagsinput.css') }}" rel="stylesheet" />
	<!-- JS Scripts-->
	<!-- jQuery Js -->
	<script src="{{ asset('assets/backend/js/jquery-1.10.2.js') }}"></script>
	<!-- Bootstrap Js -->
	<script src="{{ asset('assets/backend/js/bootstrap.min.js') }}"></script>
    @include('UEditor::head')
</head>

<body>
<div id="wrapper">
    <nav class="navbar navbar-default top-navbar" role="navigation">
        <div class="navbar-header">
            <a class="navbar-brand" href="{{ url('backend/') }}"><i class="fa fa-comments"></i> <strong>Meggie's Blog </strong></a>
        </div>

        <ul class="nav navbar-top-links navbar-right">
            <li class="dropdown">
                <a class="dropdown-toggle" data-toggle="dropdown" href="#" aria-expanded="false">
                    <i class="fa fa-user fa-fw"></i>您好，{{ Auth::user()->fullname }} <i class="fa fa-caret-down"></i>
                </a>
                <ul class="dropdown-menu dropdown-user">
                    <li>
                        <a href="{{ url('backend/logout') }}"><i class="fa fa-sign-out fa-fw"></i> 退出系统</a>
                    </li>
                </ul>
                <!-- /.dropdown-user -->
            </li>
            <!-- /.dropdown -->
        </ul>
    </nav>
    <nav class="navbar-default navbar-side" role="navigation">
        <div class="sidebar-collapse">
            <ul class="nav" id="main-menu">
                <li>
                    <a @if(starts_with(Request::path(), 'backend/categories') != false ) class="active-menu" @endif href="{{ url('backend/categories') }}">
                        <i class="fa fa-bar-chart-o"></i> 分类
                    </a>
                </li>
                <li>
                    <a @if(starts_with(Request::path(), 'backend/articles') != false ) class="active-menu" @endif href="{{ url('backend/articles') }}">
                        <i class="fa fa-desktop"></i> 文章
                    </a>
                </li>
<!--                 <li> -->
<!--                     <a @if(starts_with(Request::path(), 'backend/galleries') != false ) class="active-menu" @endif href="{{ url('backend/galleries') }}"> -->
<!--                         <i class="fa fa-table"></i> 相册 -->
<!--                     </a> -->
<!--                 </li> -->
                <li>
                    <a @if(starts_with(Request::path(), 'backend/tags') != false ) class="active-menu" @endif href="{{ url('backend/tags') }}">
                        <i class="fa fa-qrcode"></i> 标签
                    </a>
                </li>
                <li>
                    <a @if(starts_with(Request::path(), 'backend/members') != false ) class="active-menu" @endif href="{{ url('backend/members') }}">
                        <i class="fa fa-table"></i> 用户
                    </a>
                </li>
                <li>
                    <a @if(starts_with(Request::path(), 'backend/comments') != false ) class="active-menu" @endif href="{{ url('backend/comments') }}">
                        <i class="fa fa-table"></i> 评论
                    </a>
                </li>
            </ul>

        </div>

    </nav>
    <!-- /. NAV SIDE  -->
    @yield('content')
    <!-- /. PAGE WRAPPER  -->
</div>
<!-- /. WRAPPER  -->
<script src="{{ asset('assets/backend/js/bootstrap-tagsinput.js') }}"></script>
<script>
    $(document).ready(function() {

        var H = $(window).height();
        var h1 = $('#page-wrapper').height();

        if($('#content').length > 0) {
            var ue = UE.getEditor('content', {
                initialFrameHeight: 400
            });
    		ue.ready(function() {
    			ue.execCommand('serverparam', '_token', '{{ csrf_token() }}');
    		});
        } else {
            if(H - 140 - h1 > 0) {
                $('#page-wrapper').height(H - 70);
            }
        }
    });
</script>
</body>
</html>